package co.com.inventarios.modelo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * MngtdcId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class MngtdcId implements java.io.Serializable {

	// Fields

	private String tdcclase;
	private String tdctipo;

	// Constructors

	/** default constructor */
	public MngtdcId() {
	}

	/** full constructor */
	public MngtdcId(String tdcclase, String tdctipo) {
		this.tdcclase = tdcclase;
		this.tdctipo = tdctipo;
	}

	// Property accessors

	@Column(name = "TDCCLASE", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getTdcclase() {
		return this.tdcclase;
	}

	public void setTdcclase(String tdcclase) {
		this.tdcclase = tdcclase;
	}

	@Column(name = "TDCTIPO", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getTdctipo() {
		return this.tdctipo;
	}

	public void setTdctipo(String tdctipo) {
		this.tdctipo = tdctipo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof MngtdcId))
			return false;
		MngtdcId castOther = (MngtdcId) other;

		return ((this.getTdcclase() == castOther.getTdcclase()) || (this
				.getTdcclase() != null
				&& castOther.getTdcclase() != null && this.getTdcclase()
				.equals(castOther.getTdcclase())))
				&& ((this.getTdctipo() == castOther.getTdctipo()) || (this
						.getTdctipo() != null
						&& castOther.getTdctipo() != null && this.getTdctipo()
						.equals(castOther.getTdctipo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getTdcclase() == null ? 0 : this.getTdcclase().hashCode());
		result = 37 * result
				+ (getTdctipo() == null ? 0 : this.getTdctipo().hashCode());
		return result;
	}

}